/**
 * 
 */
package org.cuatrovientos.imc;

import java.util.Scanner;



/**
 * @author Jesus
 *
 *1/ We need to save 3 different values: height, weight and imc
 *		- To do that we will create 3 variables
 *2/ We need to ask the user to introduce the values of height and weight and calculate the imc
 *		- We need to create the line to writing and do the math operation (weight / height^2)
 *3/ We need to show on screen the different categories of imc and also show an advice depending of which categorie are the user
 *		- We will use a switch case showing the 3 different cases and printing on screen the advice 
 *
 */
public class Imc {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		float height;
		float weight;
		float imc;
		
		@SuppressWarnings("resource")
		Scanner reader = new Scanner(System.in);
		String line = "";
		
		System.out.println ("Please, enter your height(cm)");
		line = reader.nextLine();
		height = Float.parseFloat(line);
		
		System.out.println ("Please, enter your weight(kg)");
		line = reader.nextLine();
		weight = Float.parseFloat(line);
		
		imc =((weight / (height*height))*10000);
		System.out.println("Your imc is" + imc);
				
		if (imc < 16){
			System.out.println("You need to eat more");
		}else if (imc >=16 && imc < 25){
			System.out.println("You are fine");
		}else if (imc >=25 && imc <30){
			System.out.println("Take some care");
		}else{
			System.out.println("Go to the hospital");			
		}
		
		
	}

	}


